/**
 * InformationSingleton.java
 *
 * @author Beatrice Bacelli
 * @author Luca Bedogni
 * @author Silvia Righini
 */
package unibo.lsb.communication;

import unibo.lsb.logic.PlayersTable;
import unibo.lsb.server.Game;

public class InformationSingleton {

	private static Game thisGame;
	private static PlayersTable thisPt;
	private static InformationSingleton is;

	private InformationSingleton() {
		thisPt = null;

	}

	public static InformationSingleton getInstance() {
		if (is == null) {
			is = new InformationSingleton();
		}
		return is;
	}

	public static PlayersTable getpt() {
		return thisPt;
	}

	public static void setPt(PlayersTable pt) {
		thisPt = pt;
	}

	public static Game getGame() {
		return thisGame;
	}

	public static void setGame(Game game) {
		thisGame = game;
		setPt(new PlayersTable(game.getListOfPlayers()));
	}

}
